<template>
  <footer id="footer">
    <div class="footer-left">
      <span>
        <router-link to="/home" active-class="active">
          <i class="iconfont icon-home-heart-fill"></i>
          <span>山姆会员商店</span>
        </router-link>
      </span>
    </div>
    <div class="footer-right">
      <span>
        <router-link to="/member" active-class="active">
          <i class="iconfont icon-huiyuanchongzhi"></i>
          <span>{{ status ? "欢迎会员" :'成为会员' }}</span>
        </router-link>
      </span>
    </div>
  </footer>
</template>
<script>
export default {
  name: 'SamFooter',
  data() {
    return {
      status:localStorage.getItem('status')
    }
  }
};
</script>
<style lang='less' scoped>
//底部导航栏样式
#footer {
  width: 37.5rem;
  height: 4.2rem;
  position: fixed;
  bottom: 0;
  padding-bottom: 1rem;
  display: flex;
  justify-content: space-around;
  border-top: 0.1rem solid gray;
  background-color: white;
  // 导航栏图标公共样式
  .footer-left,
  .footer-right {
    display: inline-block;
    width: 8rem;
    padding-top: 1.5rem;
    .active{
      color:  rgb(58, 120, 220);;
    }

    i {
      display: inline-block;
      width: 8rem;
      text-align: center;
      line-height: 1rem;
      // 标签点击会自带蓝色背景，是因为cursor：point
      cursor: none;
    }

    span {
      display: inline-block;
      text-align: center;
      font-size: 1rem;
      line-height: 1.2rem;
      cursor: none;
    }

  }

  // 第二个图标
  .footer-right {
    width: 5rem;

    i {
      width: 5rem;
    }

  }

  .iconfont {
    font-size: 2rem;
    background-color: white;
  }
}</style>